package git.determinal.template.controller;

import git.determinal.template.model.User;
import git.determinal.template.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/login")
    public String login(String username, String password){
        User user = new User(username, password);
        String result = userService.login(user);
        System.out.println(result);
        return result;
    }
}